def computer(mode):
    if mode=="add":
        return lambda n:n+15
    elif mode=="jian":
        return lambda n:n-15
    else: 
        return lambda n:n*6


x=computer("add")
print(x(8))
y=computer("jian")
print(y(10))
z=computer("xasdfa")
print(z(6))















# def computer(type): 
#     if type=="double":
#         return lambda n:n*2
#     elif type=="half":
#         return lambda n:n/2
#     else:
#         return lambda n:n*n

# fun=computer("half")
# print(fun(10))

# fun=computer("double")
# print(fun(10))

# fun=computer("test")
# print(fun(10))